package com.itheima.d4_byte_stream;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class FileOutputStreamTest4 {
    public static void main(String[] args) throws Exception {
        //OutputStream os=new FileOutputStream("C:\\Users\\dell\\IdeaProjects\\file-io-app\\src\\itheima04out.txt");
        //追加管道，不覆盖
        OutputStream os=new FileOutputStream("C:\\Users\\dell\\IdeaProjects\\file-io-app\\src\\itheima04out.txt",true);
        os.write(97);//代表‘a'
        os.write('b');

        byte[] buffer="我爱你祖国".getBytes();
        os.write(buffer);
        os.write(buffer,0,15);
        os.close();
    }
}
